import React from 'react';
import {inject, observer} from 'mobx-react';
import { withRouter } from 'react-router-dom';
import classnames from 'classnames';
import { Button, Tools, Modal, Toast, Icon } from 'weaver-mobile';
import { CKRichText, MapPage } from 'weaver-mobile-page';
const getLabel = Tools.getLabel;
const getCurrentPosition = MapPage.getCurrentPosition;
@withRouter
@inject('viewWorkplanStore')
@observer
export default class EditDiscussData extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
          
        }
      }

      componentWillMount() {
        const {viewWorkplanStore} = this.props;
        
        viewWorkplanStore.setRoutePath(this.props.location.pathname);
        viewWorkplanStore.setReplyConfig();
      }

      componentDidMount() {
        const { viewWorkplanStore: { writeReply } } = this.props;

      }

      render (){
        const { viewWorkplanStore: { writeReply,setBlogText } } = this.props;
        const replyProps = {
            onBrowserChange: this.onBrowserChange,
            onUploadChange: this.onUploadChange,
            onAtChange:this.onAtChange,
                leftConfig: [
                    {type: 'voice'},
                    {type: 'blog-biaoqing'},
                    {type: 'blog-tupian', model: 2},
                    {type: '@'},
                    {type: 'tianjia'}
                ]
            }
        const config = {
        browserContextMenuOnCtrl: false,
        enableContextMenu: false,
        }
        return (
            <div>
                <CKRichText store={writeReply}
                    onChange={(val) => setBlogText(val)} 
                    replyProps={replyProps}
                    config={config}
                />
            </div>
        )

      }


}